﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using HigLabo.Net.Extensions;

namespace HigLabo.Net.Twitter
{
    public partial class TwitterClient
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public RateLimits GetApplicationRateLimitStatus()
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Help.GetRateLimitStatusUrl);
            return new RateLimits(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public RateLimits GetApplicationRateLimitStatus(GetAppRateLimitStatusCommand command)
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Help.GetRateLimitStatusUrl, command);
            return new RateLimits(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public String GetHelpTos()
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Help.GetTosUrl);
            return Func.CreateDictionary(jsonText).ToString("tos");
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public String GetHelpPrivacy()
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Help.GetPrivacyUrl);
            return Func.CreateDictionary(jsonText).ToString("privacy");
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public LanguageCollection GetSupportLanguages()
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Help.GetLanguagesUrl);
            return new LanguageCollection(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Configuration GetConfiguration()
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Help.GetConfigurationUrl);
            return new Configuration(jsonText);
        }
    }
}
